<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>试卷管理</title>
<link href="<?php echo $_BASE_DIR?>css_v1/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $_BASE_DIR?>css_v1/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jquery2.2.0.min.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jmw.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/select-ui.min.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/jquery.DatePicker.js"></script>
<script type="text/javascript" src="<?php echo $_BASE_DIR?>js_v1/layer.js"></script>
<script src="<?php echo $_BASE_DIR?>javascripts/jquery.ocupload.min.js"
  type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(e) {
    $(".select1").uedSelect({
		width : 345			  
	});
	$(".select2").uedSelect({
		width : 167  
	});
	$(".select3").uedSelect({
		width : 80
	});
});
</script>



</head>

<body>

<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="<?php echo url("leftmenu/bottom")?>">首页</a></li>
    <li><a href="#">试卷管理</a></li>
    </ul>
    </div>
 <form method="post" action="<?php echo url("question/subject") ?>">
     <div style="clear: both;width:1100px;height:35px;line-height:35px;margin-bottom:5px;">
    <div class="rightinfo">	

        </div>
         </div>

</form>	
    <div class="tools">
    
    	<ul class="toolbar">
        <li ><a href="<?php echo url("question/add",array("paper_id"=>$paper_id))?>"><span><img src="<?php echo $_BASE_DIR?>images_v1/t01.png" /></span>添加</a></li>
       <li ><a href="#" onclick="editindex('questionid','<?php echo url("question/add")?>/id/')"><span><img src="<?php echo $_BASE_DIR?>images_v1/t02.png" /></span>修改</a></li>
       
        <li class="click"><a href="#" onclick="isDel('questionid','<?php echo url("question/del")?>','ids[]')"><span><img src="<?php echo $_BASE_DIR?>images_v1/t03.png" /></span>删除</a></li>
       <li ><input type="button" class='jmwup' name="uploadfile" value="导入试题" id="questionxls">
        <script type="text/javascript">
            var index;
            $('#questionxls').upload({
              action: '<?php echo(url('admin::question/import',array("paper_id"=>$paper_id))) ?>',
              onSubmit:function(e){
                index = layer.load(1, {
                  shade: [0.3,'#fff'] //0.1透明度的白色背景
                });
              },
              onComplete: function(data) {
                var obj = eval('('+ data +')');
                if(obj.err == '' && obj.msg.url)
                {
                  layer.close(index); 
                  alert(导入成功);
                  location.reload()
                  
                }else{
                layer.close(index); 
                  alert(obj.err);
                  location.reload()
                }
              }
            });
            </script>
        </li>

        <li class="click"><a href="<?php echo $_BASE_DIR?>document/test.xlsx" download="模板.xlsx"><span></span>下载模板</a></li>
        </ul>

    </div>
<!---------------------------------------------------------------------------- -->

	<script>
	</script>
<form action="" method="post" name="form">
	
    <table class="tablelist">

    	<thead>
    	<tr>
        <th width="5%"><input type="checkbox" value="on" name="chkall" onClick="CheckAll(this.form)"/></th>
                <th width="15%" >题号</th>
                <th width="15%" >试题名称</th>
                <th width="15%" >创建时间</th>
                <th width="25%" >操作</th>
			
        </tr>
        </thead>
        <tbody>
        <?php foreach ($item as $k=>$v):?>
        <tr>
            <td><input name="questionid" id="questionid" type="checkbox" value="<?php echo $v->id?>" /></td>
            <td><?php echo h($v->question_number)?></td>
            <td><?php echo h($v->title)?></td>
            <td><?php echo h(date('Y-m-d H:i:s',$v->created))?></td>
            <td>
                <a href="<?php echo url("question").'/add/id/'.$v->id?>">编辑</a>
            </td>

        </tr> 
        <?php endforeach;?>
        
        </tbody>
    </table>
    
   </form>
 
    	<?php echo Q::control('pagination','pagination',array('url_args'=>$param,'pagination'=>$pagination,'show_count'=>1))?>
    </div>
  
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	</script>

</body>
<iframe id="excel" name="excel" width="0" height="0"></iframe>
</html>


